package com.systemdemo;

/**
 * @Auther: shiquan
 * @Date: 2024/10/24 - 10 - 24 -14:41
 */
public class SystemDemo2 {
    public static void main(String[] args) {

        long start = System.currentTimeMillis();
        for (int i = 1; i < 100000; i++) {
            boolean flag=isprime1(i);
            if (flag){
                System.out.println(i);
            }
        }
       long end = System.currentTimeMillis();
        //获取运行总时间
        System.out.println(end-start);
    }

    public static boolean isprime1(int number){
        for (int i = 2; i<number ; i++) {
            if (number%i==0){
                return false;
            }
        }
        return true;
    }
}
